package com.zyy.meetObject;

import javax.security.auth.login.AccountException;

public class account {
    private  int id;
    private double balance;
    private  double annualInterestRate;
    public account(int i,double b,double a){
        id = i;
        balance = b;
        annualInterestRate = a;
    }
    public void  setId(int a){
        id = a;
    }
    public int getId(){
        return id;
    }
    public  void  setBalance(double b){
        balance = b;
    }
    public  double getBalance(){
        return balance;
    }
    public  void setAnnualInterestRate(double d){
        annualInterestRate = d;
    }
    public double getAnnualInterestRate(){
        return annualInterestRate;
    }

    public void withdraw(double amount){
        if(amount <= balance){
            System.out.println("成功取出");
        }else{
            System.out.println("余额不足，取款失败");
        }
    }
}
